package message;

import java.io.Serializable;

/**
 * This class is used as a wrapper for all requests sent between proxy and fileserver. 
 * It extends the usual DTO's with a HMAC for integrity control.
 * 
 * @author hansjorghofer
 *
 */
public class RequestWrapper implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4543662687197711761L;
	
	private Request request;
	private String hmac;
	
	public RequestWrapper(Request request, String hmac) {
		this.request = request;
		this.hmac = hmac;
	}
	
	public Request getRequest() {
		return request;
	}
	
	public String getHmac() {
		return hmac;
	}

	@Override
	public String toString() {
		return hmac + " " + request.toString();
	}
}
